﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Entity
{
    [SugarTable("WCS_DEV_STATE")]
    public class DevPlcStationState
    {
        /// <summary>
        /// Plc站台号
        /// </summary>
        public string Station_Plc_No { get; set; }

        /// <summary>
        /// 连接
        /// </summary>
        public int Connect { get; set; }

        /// <summary>
        /// 空闲
        /// </summary>
        public int Free { get; set; }

        /// <summary>
        /// 有货
        /// </summary>
        public int Goods { get; set; }

        /// <summary>
        /// 无货
        /// </summary>
        public int NotGoods { get; set; }

        /// <summary>
        /// 有货运行
        /// </summary>
        public int GoodsRun { get; set; }

        /// <summary>
        /// 无货运行
        /// </summary>
        public int NotGoodsRun { get; set; }

        /// <summary>
        /// 异常
        /// </summary>
        public int Error { get; set; }

        /// <summary>
        /// 目标层数
        /// </summary>
        public string EndLayer { get; set; }

        /// <summary>
        /// 目标仓库
        /// </summary>
        public string EndWarehouse { get; set; }

        /// <summary>
        /// 任务号
        /// </summary>
        public string TaskCode { get; set; }

        /// <summary>
        /// 托盘号
        /// </summary>
        public string TrayCode { get; set; }

        /// <summary>
        /// 错误代码
        /// </summary>
        public int ErrorCode { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 是否自动
        /// </summary>
        public int Auto { get; set; }

        /// <summary>
        /// 堆垛机位置
        /// </summary>
        public int StackerLocation { get; set; }
    }

    /// <summary>
    /// 设备状态
    /// </summary>
    public enum DeviceState
    {
        有货 = 1,
        无货 = 2,
        有货运行 = 3,
        无货运行 = 4,
        空闲 = 5,
        报警 = 6,
    }

    /// <summary>
    /// 设备状态
    /// </summary>
    public enum DeviceWorkingMode
    {
        自动 = 1,
        手动 = 2,
    }
}
